/*
 * UDPPacket.h
 *
 *  Created on: Nov 28, 2013
 *      Author: wyf
 */

#ifndef UDPPACKET_H_
#define UDPPACKET_H_

#include "stdio.h"
#include "ctType.h"

class UDPPacket {
	public:
		UDPPacket();
		UDPPacket(DWORD type, unsigned char* pbuf = 0, DWORD len = 0);
		UDPPacket(const UDPPacket& pack);
		UDPPacket& operator=(const UDPPacket& other);
		virtual ~UDPPacket();

		void copyto(UDPPacket* pTarget);
		void copydata(unsigned char* pbuf, DWORD len);

	public:
		DWORD _type;
		DWORD _len;
		uint8_t* _buf;
		//type 0,rtp  1,rtcp 2,join in 3,leave
};

#endif /* UDPPACKET_H_ */

